import {Plugin} from "vite";
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import {createMockPlugin} from "./mock"; // mock 数据插件
import {configVisualizerConfig} from "./visualizer"; // 包体积分析插件
import {configSvgIconsPlugin} from "./svgIcons";
import {configImpPlugin} from "./imp";
import {configCompnent} from "./component"; // 自动导入组件
// import {configVant} from "./vant"; // vite-plugin-style-import 官方插件有问题 改为 configImpPlugin


export function createVitePlugin(){
    const vitePlugins:(Plugin | Plugin[])[] = [
        vue(),
        vueJsx(),
        createMockPlugin(),
        configVisualizerConfig(),
        configSvgIconsPlugin(),
        configImpPlugin(),
        configCompnent()
    ]
    return vitePlugins;
}
